/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

/**
 *
 * @author PhucAnh
 */
public class Board {

    private int[][] boardCell;

    public Board(){
        boardCell = new int[20][20];
    }
    public void resetBoard() {
        for (int i = 0; i < 20; i++) {
            for (int j = 0; j < 20; j++) {
                boardCell[i][j] = 0;
            }
        }
    }

    public void updateBoard(int x, int y, int value) {

        boardCell[x][y] = value;
    }

    public int[][] getBoardCell() {
        return boardCell;
    }

    public void setBoardCell(int[][] boardCell) {
        this.boardCell = boardCell;
    }

    public int getElementOfBoard(int x, int y) {
        return boardCell[x][y];
    }
    
    public void updateBoard(Position p,int value){
        boardCell[p.getX()][p.getY()] = value;
    }
}
